﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class _Default : System.Web.UI.Page
{
    FormulaDAO dao;
    Formula formula;
    protected void Page_Load(object sender, EventArgs e)
    {
        dao = new FormulaDAO();
        formula = new Formula();
        load_data();

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("addFormula.aspx");
    }
    public void load_data()
    {
        DataSet ds = new DataSet();
        ds = dao.get();
        GridView1.DataSource = ds.Tables[0];
        GridView1.DataBind();
    }
    protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        Response.Redirect("updateFormula.aspx");
    }
}